Use robust path when reading .ruby-version
#680
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does it do?
Addresses https://github.com/wordpress-mobile/release-toolkit/pull/677/files#r2583457311
The
.buildkite/shared-pipeline-varsscript hardcoded the Ruby version instead of reading from.ruby-version. This change uses${BASH_SOURCE[0]}to construct a location-independent path to.ruby-version, ensuring the script works regardless of the sourcing directory.Before:
After:
Checklist before requesting a review
Run(Shell script change only)bundle exec rubocopto test for code style violations and recommendations.Add Unit Tests (aka(No test infrastructure for shell scripts)specs/*_spec.rb) if applicable.Run(Shell script change only)bundle exec rspecto run the whole test suite and ensure all your tests pass.Make sure you added an entry in the(Internal tooling change)CHANGELOG.mdfile to describe your changes under the appropriate existing###subsection of the existing## Trunksection.If applicable, add an entry in the(Not applicable)MIGRATION.mdfile to describe how the changes will affect the migration from the previous major version and what the clients will need to change and consider.Original prompt
.ruby-version#679💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.